//暴力解法
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, x;
    cin >> n >> x;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }
    int cur = 0;
    int dest = 0;
    int mincur = 0;
    int mindest = 0;
    int l = 1e9;
    while (dest <= n - 1) {
        int sum = 0;
        while (sum < x && cur <= n - 1) {
            sum += v[cur++];
        }
        if (cur >= n - 1) {
            break;
        }
        if (cur - dest < l) {
            l = cur - dest;
            mincur = cur;
            mindest = dest;
        }
        dest++;
        cur = dest;
    }
    cout << mindest + 1 << " " << mincur;

}
//滑动窗口
//#include <iostream>
//using namespace std;
//const int N = 1e9 + 10;
//int arr[N];
//int main(){
//    int n,x;
//    cin >> n >> x;
//    for(int i = 1 ; i <= n ; i++) cin >> arr[i];
//    int left = 0 , right = 0 , sum = 0;
//    int retLen = N , retr = -1 , retl = -1;
//   while(right <= n){
//        sum += arr[right];
//        while(sum >= x){
//            if(right - left + 1 < retLen){
//                retl = left;
//               retr = right;
//                retLen = right - left + 1;
//            }
//            sum -= arr[left++];
//        }
//        right++;
//    }
//    cout << retl << " " << retr;
//    return 0;
//}